<template>
	<view class="container">
		<!--头部start-->
		<view class="header">
			<u-status-bar></u-status-bar>
			<view class="index_header">
				<text :class="navIndex==0?'on':''" @click="checkIndex(0)">广告机</text>
				<text :class="navIndex==1?'on':''" @click="checkIndex(1)">待激活</text>
				<text :class="navIndex==2?'on':''" @click="checkIndex(2)">已启动</text>
				<image src="/static/images/img_79.png" mode="widthFix" class="p_img"></image>
			</view>
		</view>
		<u-status-bar></u-status-bar>
		<!--头部end-->
		
			<!--广告机start-->
			<view v-show="navIndex==0">
				<Machine></Machine>
			</view>
			<!--广告机end-->
			<!--待激活start-->
			<view v-show="navIndex==1">
				<activation></activation>
			</view>
			<!--待激活end-->
			
			<!--已启动start-->
			<view v-show="navIndex==2">
				<started></started>
			</view>
			<!--已启动end-->
		<u-safe-bottom></u-safe-bottom>
		
		
	</view>
</template>

<script>
	import Machine from './machine.vue'
	import activation from './activation.vue'
	import started from './started.vue'
	export default {
	    components: {
	        /***** mescroll S *****/
	        //注册组件
	        Machine,
			activation,
			started,
	        /***** mescroll E *****/
	    },
	    data() {
	        return {
				navIndex: 0,
				
	        }
	    },
	    methods: {
			checkIndex(index) {
				console.log(index)
				this.navIndex = index;
			},
			changeName(idx){
				this.tabBarId=idx
			}
	    },
		computed: {
			
			
		},
	}
</script>
<style lang="scss">
	@import url("../../common/style.scss");
	@import url("machine.scss");
</style>